/*----------------------------------------------------------------------------\
|                                某个环节人员值对象JS
|-----------------------------------------------------------------------------*/

function WfcJS_OperatorVO()
{
    this.routeCode="";   //路由编号
    this.flgOtherOperator="";  //是否可以从组织结构中选择
    this.flgOneOperator="";  //是否只能选择一个人
    this.nodeName="";  //环节名称
    this.operatorCode =new Array(); //操作人员编号集合
    this.operatorName =new Array(); //操作人员名称集合
    this.orgtype =new Array();  //操作人员类型集合
    this.orgBCFL =new Array();  //操作人员本层分类编码
    this.departmentName =new Array(); //部门名称集合
    this.isPrepicked =new Array();  //是否预选
    this.operatorCount = 0;         //环节操作人员数量
    this.operateMode = "";          //操作模式
    this.flgDefaultOperator="";  //是否选择其他环节的操作人员，主要是驳回操作
}

WfcJS_OperatorVO.prototype.setRouteCode=function (partment)
{
  this.routeCode=partment;
}

WfcJS_OperatorVO.prototype.getRouteCode=function()
{
  return this.routeCode;
}

WfcJS_OperatorVO.prototype.setOperateMode=function (partment)
{
  this.operateMode=partment;
}

WfcJS_OperatorVO.prototype.getOperateMode=function()
{
  return this.operateMode;
}


WfcJS_OperatorVO.prototype.setFlgOtherOperator=function (partment)
{
  this.flgOtherOperator=partment;
}

WfcJS_OperatorVO.prototype.getFlgOtherOperator=function()
{
  return this.flgOtherOperator;
}


WfcJS_OperatorVO.prototype.setFlgOneOperator=function (partment)
{
  this.flgOneOperator=partment;
}

WfcJS_OperatorVO.prototype.getFlgOneOperator=function()
{
  return this.flgOneOperator;
}

WfcJS_OperatorVO.prototype.setNodeName=function (partment)
{
     this.nodeName=partment;
}

WfcJS_OperatorVO.prototype.getNodeName=function ()
{
    return this.nodeName;
}

WfcJS_OperatorVO.prototype.setOperatorCode=function (partment)
{
     this.operatorCode=partment;
}

WfcJS_OperatorVO.prototype.getOperatorCode=function ()
{
    return this.operatorCode;
}

WfcJS_OperatorVO.prototype.setOperatorName=function (partment)
{
     this.operatorName=partment;
}

WfcJS_OperatorVO.prototype.getOperatorName=function ()
{
    return this.operatorName;
}

WfcJS_OperatorVO.prototype.setOrgtype=function (partment)
{
     this.orgtype=partment;
}

WfcJS_OperatorVO.prototype.getOrgtype=function ()
{
    return this.orgtype;
}

WfcJS_OperatorVO.prototype.setDepartmentName=function (partment)
{
     this.departmentName=partment;
}

WfcJS_OperatorVO.prototype.getDepartmentName=function ()
{
    return this.departmentName;
}

WfcJS_OperatorVO.prototype.setOrgBCFL=function (partment)
{
     this.orgBCFL=partment;
}

WfcJS_OperatorVO.prototype.getOrgBCFL=function ()
{
    return this.orgBCFL;
}

WfcJS_OperatorVO.prototype.setIsPrepicked=function (partment)
{
     this.isPrepicked=partment;
}

WfcJS_OperatorVO.prototype.getIsPrepicked=function ()
{
    return this.isPrepicked;
}
WfcJS_OperatorVO.prototype.setOperatorCount=function (partment)
{
     this.operatorCount=partment;
}

WfcJS_OperatorVO.prototype.getOperatorCount=function ()
{
    return this.operatorCount;
}

WfcJS_OperatorVO.prototype.setFlgDefaultOperator=function (partment)
{
  this.flgDefaultOperator=partment;
}

WfcJS_OperatorVO.prototype.getFlgDefaultOperator=function()
{
  return this.flgDefaultOperator;
}


//------------------------------------------------------------------------------
/**
*这个对象用来保存各个选择框的组织对象
*/

function OrgListMapVO()
{
 this.key="";
 this.routeName="";
 this.routeCode="";
 this.orgVOList=new Array();
}



OrgListMapVO.prototype.setKey=function(key)
{

  this.key=key;
}

OrgListMapVO.prototype.getKey=function()
{
  return this.key;
}

OrgListMapVO.prototype.setRouteName=function(routeName)
{
  this.routeName=routeName;
}

OrgListMapVO.prototype.getRouteName=function()
{
  return this.routeName;
}

OrgListMapVO.prototype.setRouteCode=function(routeCode)
{
  this.routeCode=routeCode;
}


OrgListMapVO.prototype.getOrgVOList=function()
{
  return this.orgVOList;
}
OrgListMapVO.prototype.setOrgVOList=function(orgVOList)
{
  this.orgVOList=orgVOList;
}

OrgListMapVO.prototype.getRouteCode=function()
{
  return this.routeCode;
}

OrgListMapVO.prototype.addOrgVO=function(orgVO)
{
    var objCount=this.orgVOList.length;

    var Iweary=new OrgVOJs();

    Iweary.setOrgBCFL(orgVO.getOrgBCFL());
    Iweary.setOrgName(orgVO.getOrgName());
    Iweary.setOrgSCFL(orgVO.getOrgSCFL());
    Iweary.setOrgType(orgVO.getOrgType());
    Iweary.setOrgCode(orgVO.getOrgCode());
    Iweary.setFlgCheck(orgVO.getFlgCheck());
    this.orgVOList[objCount]=Iweary;
}

OrgListMapVO.prototype.getOrgVOCont=function()
{
    var objCount=this.orgVOList.length;
    return objCount;
}

/**
* 查找某个数组对象
*/
OrgListMapVO.prototype.fndbyOrgCode= function (orgCode)
{
  if(orgCode==null) return null;

  var objCount=this.orgVOList.length;
  var tmpobj=null;
   for(var i=0;i<objCount;i++)
   {
      tmpobj=this.orgVOList[i];
      if(tmpobj!=null)
      {
         if(tmpobj.getOrgCode()==orgCode)
         {
            return tmpobj;
         }
      }
      tmpobj=null;
   }
  return null;
}


/**
*
*/
function OrgListMap()
{
  this.groupId="";
  this.arrayList=new Array();
}

OrgListMap.prototype.setGroupId=function(groupId)
{
  this.groupId=groupId;
}

OrgListMap.prototype.getGroupId=function()
{
  return this.groupId;
}

OrgListMap.prototype.addOrgListMapVO=function(orgListMapVO)
{

    var objCount=this.arrayList.length;

    var newOrgListMapVO=new OrgListMapVO();

    newOrgListMapVO.setKey(orgListMapVO.getKey());
    newOrgListMapVO.setRouteName(orgListMapVO.getRouteName());
    newOrgListMapVO.setRouteCode(orgListMapVO.getRouteCode());
    for(i=0;i<orgListMapVO.getOrgVOList().length;i++)
    {
     newOrgListMapVO.addOrgVO(orgListMapVO.getOrgVOList()[i]);
    }
    //newOrgListMapVO.setOrgVOList(orgListMapVO.getOrgVOList());

    this.arrayList[objCount]=newOrgListMapVO;
}

/**
* 查找某个数组对象
*/
OrgListMap.prototype.fndbyIndex= function (pindex)
{
  try
  {
     var tmpobj=this.arrayList[pindex];
     return tmpobj
  }
  catch(ex)
  {
  }
  return null;
}

OrgListMap.prototype.getOrgListMapVOByKey=function(key)
{
 if(key==null) return null;

  var objCount=this.arrayList.length;
  var tmpobj=null;
   for(var i=0;i<objCount;i++)
   {
      tmpobj=this.arrayList[i];
      if(tmpobj!=null)
      {
         if(tmpobj.getKey()==key)
         {
            return tmpobj;
         }
      }
      tmpobj=null;
   }
  return null;
}


/**
*得到记录数
*/
OrgListMap.prototype.getObjCount=function ()
{
  return this.arrayList.length;
}